﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialList.aspx.cs" Inherits="BySoft.Web.Site.MasteData.MaterialList"
    MasterPageFile="~/MastePage/SubEmptyMaster.master" %>

<%@ Register Assembly="OneSoft.Web" Namespace="OneSoft.Web.UI.WebControls" TagPrefix="asp" %>
<%@ Register Assembly="BySoft.Web.Controls" Namespace="BySoft.Web.Controls" TagPrefix="cc1" %>
<asp:Content ID="cphHeadContent" runat="server" ContentPlaceHolderID="HeadPlace">
	<script language="javascript" type="text/javascript">
	   <%-- function FunAddCompany(MaterialID) {
	        ShowTopDialog('替换', '../ComPage/MaterialListExChange.aspx?MaterialID=' + MaterialID, 'FillFile();', 500, 200); return false;
	    }
	    function FillFile() {
	        var str = getCookie(dialogReturn_key);
	        if (str != null && str == "success") {
	            $("#<%=btnHidden.ClientID%>").click();
            }
            setCookie(dialogReturn_key, "");
	    }--%>
	    var last = null;
	    function judge(obj) {
	        if (last == null) {
	            last = obj.id;
	        }
	        else {
	            var lo = document.getElementById(last);
	            lo.checked = "";
	            last = obj.id;
	        }
	        obj.checked = "checked";
	    }
    </script>
	</asp:Content>
<asp:Content ContentPlaceHolderID="EmptyMasteCPH" runat="server" ID="cphContent">
    
    <h1 class="tit">
        基础资料 >> 原料资料</h1>
    <br />
    <%--查询条件--%>
    <div class="searchTable">
        <table cellpadding="0" cellspacing="0">
		<tr>
    <th class="left2">
        类型：
    </th>
    <td class="right2">  <asp:DropDownList CssClass="fullHeight" ID="ddlMatTypeID" runat="server"></asp:DropDownList>
    </td>
    <th class="left2">
        原料编号：
    </th>
    <td class="right2">
<asp:TextBox CssClass="fullWidth" ID="txtMaterialID" runat="server"></asp:TextBox>
    </td>
</tr>
<tr>
    <th class="left2">
        原料名称：
    </th>
    <td class="right2">
<asp:TextBox CssClass="fullWidth" ID="txtMaterialName" runat="server"></asp:TextBox>
    </td>
    <th class="left2">
        状态：
    </th>
    <td class="right2">  
        <asp:DropDownList CssClass="fullHeight" ID="ddlMaterialStatus" runat="server"></asp:DropDownList>
    </td>
</tr>
        </table>
        <br />
		<div class="btnStylef">
                    <label class="btnStyleb png_bg">
                        <asp:Button Text="查询" runat="server" ID="btnQuery" OnClick="btnQuery_Click" class="png_bg" />
                    </label>
                    <label class="btnStylec png_bg">
                        <input type="button" runat="server" id="btnAdd" value="新增" onclick="window.location = 'MaterialAdd.aspx'"
                            validationgroup="gSubmit" class="png_bg" /></label>
                   <%-- <label class="btnStyleb png_bg">
                        <asp:Button Text="替换" runat="server" ID="btnExChange" OnClick="btnExChange_Click" class="png_bg Hidden" />
                        <asp:Button ID="btnHidden" runat="server" Text="Button" OnClick="btnHidden_Click" CssClass="Hidden" />
                    </label>--%>
                </div>
    </div>
    <%--列表--%>
    <div class="tableStyle" runat="server">
        <asp:SGridView runat="server" ID="grdResult" Width="100%" ShowActionToolBar="false"
            AutoGenerateColumns="false" AllowCascade="false" OnRowDataBound="grdResult_RowDataBound"
            OnRowCommand="grdResult_RowCommand" BorderWidth="0px" GridLines="None">
            <Columns>
               <%-- <asp:TemplateField>
                    <HeaderTemplate>
                        选择
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:RadioButton ID="rbSelect" runat="server"  GroupName="rdo"  />
                    </ItemTemplate>
                </asp:TemplateField>--%>
				<asp:TemplateField>
                    <HeaderTemplate>
                        类型
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblMatTypeName" runat="server" Text='<%#Eval("MaterialTypeName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        原料编号
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblMaterialID" runat="server" Text='<%#Eval("MaterialID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        原料名称
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblMaterialName" runat="server" Text='<%#Eval("MaterialName") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>
                        长
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblLong" runat="server" Text='<%#Eval("Long") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField>
                    <HeaderTemplate>
                        宽
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblWidth" runat="server" Text='<%#Eval("Width") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                 <asp:TemplateField>
                    <HeaderTemplate>
                        高
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblHeight" runat="server" Text='<%#Eval("Height") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField>
                    <HeaderTemplate>
                        外径
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblOutSide" runat="server" Text='<%#Eval("OutSide") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField>
                    <HeaderTemplate>
                        内径
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblInSide" runat="server" Text='<%#Eval("InSide") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField>
                    <HeaderTemplate>
                        规格
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblSpecifications" runat="server" Text='<%#Eval("Specifications") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>



                <asp:TemplateField>
                    <HeaderTemplate>
                        查看
                    </HeaderTemplate>
                    <HeaderStyle Width="35px" />
                    <ItemTemplate>
                        <asp:ImageButton CommandName="viewdata" CommandArgument='<%#Eval("MaterialID") %>'
                            ImageUrl="../App_Themes/Common_CSS/images/GridDetail.gif" runat="server" ID="ibtnView" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderStyle Width="35px" />
                    <HeaderTemplate>
                        编辑
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:ImageButton CommandName="edi" CommandArgument='<%#Eval("MaterialID") %>' ImageUrl="../App_Themes/Common_CSS/images/GridEdit.gif"
                            runat="server" ID="ibtnEdi" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="35px" HeaderStyle-Width="35px">
                    <HeaderTemplate>
                        删除</HeaderTemplate>
                    <ItemTemplate>
                        <asp:ImageButton ImageUrl="~/App_Themes/Common_CSS/images/delete_small.gif" runat="server"
                            ID="ibtnDel" /><asp:Button ID="btnDel" runat="server" CssClass="Hidden" CommandArgument='<%#Eval("MaterialID") %>'
                                CommandName="del" /></ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:SGridView>
        <div style="padding-top: 5px" align="right">
            <cc1:PagingControl ID="pcData" runat="server" OnPageIndexClick="pcData_PageIndexClick" />
        </div>
    </div>
</asp:Content>


